<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import = "java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Welcome to the Chat Room</title>
<%
String chatroom_id = (String)request.getAttribute("chatroom_id");
ArrayList userList = (ArrayList)application.getAttribute("onlineUsers_"+chatroom_id);
String uname =(String)request.getAttribute("uname");
%>
<body>
<h3><%=uname%>,Welcome to the chatroom <%=chatroom_id%></h3>
<h3>The number of the current online users is <%=userList.size() %></h3>

<a href="LeaveChatroomServlet?username=<%=uname%>&chatroom_id=<%=chatroom_id%>">Leave this room</a>

</body>
</html>